home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_geomview.idb / usr / freeware / catman / u_man / cat1 / clip.Z / clip
Encoding:
Text File  |  1999-01-26  |  6.9 KB  |  199 lines

  1.  
  2.  
  3.  
  4.      CCCCLLLLIIIIPPPP((((1111))))        GGGGeeeeoooommmmeeeettttrrrryyyy CCCCeeeennnntttteeeerrrr ((((22223333    NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999999994444))))           CCCCLLLLIIIIPPPP((((1111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.       clip - Clip an OOGL object against planes or other surfaces
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.       cccclllliiiipppp [----vvvv _a_x_i_s_x,_y,_z,...]
  13.           [----gggg _v_a_l_u_e-_o_r-_p_o_i_n_t] [----llll _v_a_l_u_e-_o_r-_p_o_i_n_t]
  14.           [----ssss _n_s_t_r_i_p_s[,_f_r_a_c_t_i_o_n]] [----eeee]
  15.           [----sssspppphhhh _c_e_n_t_e_r_x,_y,_z,...] [----ccccyyyyllll _c_e_n_t_e_r_x,_y,_z,...]
  16.           [_o_o_g_l_f_i_l_e]
  17.  
  18.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  19.       CCCClllliiiipppp,    adapted    from Daeron Meyer's ggggiiiinnnnssssuuuu module, allows
  20.       clipping an OOGL object against planes, spheres, or
  21.       cylinders from the UNIX command line.     Its input can come
  22.       from a file or standard input; output    is written to standard
  23.       output.
  24.  
  25.       Options specify a function of    space position;    the output is
  26.       the portion of the object where the function is greater or
  27.       less than some given value, or the portion lying between two
  28.       values.  Alternatively, an object can    be sliced into
  29.       equally-spaced strips.  Objects may be of any    dimension (but
  30.       see the BUGS section).
  31.  
  32.       Options are:
  33.  
  34.       ----gggg _v_a_l_u_e-_o_r-_p_o_i_n_t
  35.  
  36.       ----llll _v_a_l_u_e-_o_r-_p_o_i_n_t
  37.            Select the portion of the object    where the function is
  38.            greater than (----gggg) or less than (----llll) the given value.
  39.            If both are specified, the result is the    portion    of the
  40.            object satisfying both conditions.
  41.  
  42.            If, rather than a single    number,    the argument to    ----llll or
  43.            ----gggg is a point (a    series of x,y,z,... values separated
  44.            by commas, with no embedded blanks), then the clipping
  45.            surface is one chosen to    pass through that point.
  46.  
  47.       ----vvvv _a_x_i_s_x,_y,_z,...
  48.            Specifies a direction in    space.    For planar clipping
  49.            (the default), it's the plane normal direction; the
  50.            clipping    function is the    inner product between the
  51.            direction vector    and the    point on the object.  For
  52.            cylindrical clipping, ----vvvv    specifies the direction    of the
  53.            cylinder's axis;    the clipping function is the distance
  54.            from the    axis.
  55.  
  56.       ----sssspppphhhh _c_e_n_t_e_r_x,_y,_z,...
  57.            Clip against spheres centered on    _x,_y,_z,....  The
  58.            clipping    function is the    distance from the given
  59.            center.    Coordinates must be separated by commas
  60.  
  61.  
  62.  
  63.      Page 1                        (printed 12/22/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      CCCCLLLLIIIIPPPP((((1111))))        GGGGeeeeoooommmmeeeettttrrrryyyy CCCCeeeennnntttteeeerrrr ((((22223333    NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999999994444))))           CCCCLLLLIIIIPPPP((((1111))))
  71.  
  72.  
  73.  
  74.            without intervening spaces.
  75.  
  76.       ----ccccyyyyllll _c_e_n_t_e_r_x,_y,_z,...
  77.            Clip against cylinders with an axis passing through
  78.            _c_e_n_t_e_r_x,_y,_z,...,    with axis direction given by the ----vvvv
  79.            option.    The clipping function is the distance from the
  80.            axis.
  81.  
  82.       ----ssss _n_s_l_i_c_e_s[,_f_r_a_c_t_i_o_n]
  83.            Clip an object into a series of _n_s_l_i_c_e_s ribbons
  84.            spanning    its entire extent -- the range of function-
  85.            values over the object.    Part of    each ribbon is
  86.            omitted;    the _f_r_a_c_t_i_o_n, default .5, sets the width of
  87.            the visible part    of a ribbon compared to    the ribbon
  88.            period.    There are a total of (_n_s_l_i_c_e_s+_f_r_a_c_t_i_o_n-1)
  89.            ribbon periods across the object, so e.g. ----ssss 2222,,,,....5555
  90.            slices the object into equal thirds, omitting the
  91.            middle third.  The output OOGL object is    a LIST of
  92.            OFFs, one per ribbon.
  93.  
  94.       ----eeee   Don't emit a clipped OOGL object, just print two
  95.            numbers,    listing    the minimum and    maximum    function
  96.            values for the object.  If ----gggg or    ----llll clipping options
  97.            are specified, the object is clipped before determining
  98.            the function range.  If none of the object remains,
  99.            cccclllliiiipppp prints "0 0".
  100.  
  101.      EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  102.       To extract the portion of an object lying below the x+y+z=1
  103.       plane:
  104.  
  105.         clip -l 1  -v 1,1,1     file.oogl  > portion.oogl
  106.  
  107.       To extract the portion of an object lying in the positive
  108.       octant and below the x+y+z=1 plane, we can pipe multiple
  109.       instances of cccclllliiiipppp together to    find the intersection of
  110.       several half-spaces:
  111.  
  112.         clip -g 0  -v 1,0,0    file.oogl | \
  113.            clip -g 0 -v 0,1,0 | \
  114.            clip -g 0 -v 0,0,1 | \
  115.            clip -l 1 -v 1,1,1 > portion.oogl
  116.  
  117.       To find the region lying between two surfaces    (either    above
  118.       one and below    the other, or below the    first and above    the
  119.       second), say the planes 2x + y -.5z =    1 and y    + 2z = 0:
  120.  
  121.            echo "{ LIST"
  122.            clip -v 2,1,-.5 -g 1  file.oogl | clip -v 0,1,2 -l 0
  123.            clip -v 2,1,-.5 -l 1  file.oogl | clip -v 0,1,2 -g 0
  124.            echo "}"
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                        (printed 12/22/98)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      CCCCLLLLIIIIPPPP((((1111))))        GGGGeeeeoooommmmeeeettttrrrryyyy CCCCeeeennnntttteeeerrrr ((((22223333    NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999999994444))))           CCCCLLLLIIIIPPPP((((1111))))
  137.  
  138.  
  139.  
  140.       We use pipelines to compute intersections, and a LIST    to
  141.       form their union.
  142.  
  143.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  144.       ginsu(1)
  145.  
  146.      BBBBUUUUGGGGSSSS
  147.       Uses anytooff(1) to convert input data to OFF    format
  148.       internally; this can lose information.  The only arbitrary-
  149.       dimensional form accepted at present is nOFF,    not nSKEL or
  150.       nMESH.  However the four-dimensional 4OFF, 4QUAD, 4MESH,
  151.       4VECT, etc. formats should work.
  152.  
  153.       CCCClllliiiipppp really only clips edges.     If a curved clipping surface
  154.       cuts an edge twice, or removes only an interior portion of
  155.       some polygon,    cccclllliiiipppp misses it entirely.  Clipping against a
  156.       curved surface yields    a straight edge    (a chord of the    ideal
  157.       curved edge segment).     This latter failing might be fixed
  158.       someday.
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.      Page 3                        (printed 12/22/98)
  196.  
  197.  
  198.  
  199.